<script>
export default {
  created () {
    // 调用API从本地缓存中获取数据
    /*
     * 平台 api 差异的处理方式:  api 方法统一挂载到 mpvue 名称空间, 平台判断通过 mpvuePlatform 特征字符串
     * 微信：mpvue === wx, mpvuePlatform === 'wx'
     * 头条：mpvue === tt, mpvuePlatform === 'tt'
     * 百度：mpvue === swan, mpvuePlatform === 'swan'
     * 支付宝(蚂蚁)：mpvue === my, mpvuePlatform === 'my'
     */

    let logs
    if (mpvuePlatform === 'my') {
      logs = mpvue.getStorageSync({key: 'logs'}).data || []
      logs.unshift(Date.now())
      mpvue.setStorageSync({
        key: 'logs',
        data: logs
      })
    } else {
      logs = mpvue.getStorageSync('logs') || []
      logs.unshift(Date.now())
      mpvue.setStorageSync('logs', logs)
    }
  },
  log () {
    console.log(`log at:${Date.now()}`)
  }
}
</script>

<style>
  @font-face {
    font-family: 'iconfont';
    src: url('//at.alicdn.com/t/font_1382835_nowrd3dnxh9.woff2') format('woff2');
  }

  .iconfont {
    font-family: "iconfont" !important;
    font-size: 16px;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  .icon-tixing::before {
    content: "\e600";
  }

  .icon-gongxiang::before {
    content: "\e63f";
  }

  .icon-xia::before {
    content: "\e62f";
  }

  .icon-shang::before {
    content: "\e601";
  }

  .icon-xiaoxi::before {
    content: "\e633";
  }

  .icon-tishi::before {
    content: "\e662";
  }

  .MTR-30 {
    margin-top: 30rpx !important;
  }

  .MTR-20 {
    margin-top: 20rpx !important;
  }

  .dn {
    display: none !important;
  }

  .MBT-20 {
    margin-bottom: 20rpx !important;
  }

  .MTR-50 {
    margin-top: 50rpx !important;
  }

  .MTR-40 {
    margin-top: 40rpx !important;
  }

  .MTR-10 {
    margin-top: 40rpx !important;
  }

  .c-table {
    border: 0 solid darkblue;
    font-size: 24rpx;
  }

  .c-table .tr {
    display: flex;
    width: 100%;
    justify-content: center;
    height: 85rpx;
    align-items: center;
    border-bottom: 1px solid rgba(218, 225, 230, 1);
  }

  .c-table .th {
    font-size: 24rpx;
    flex: 1;
    font-weight: 600;
    height: 85rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(102, 102, 102, 1);
    background: rgba(245, 248, 250, 1);
  }

  .c-table .td {
    font-size: 24rpx;
    background: #fff;
    height: 85rpx;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(102, 102, 102, 1);
  }

  .c-table-filter {
    width: 20rpx;
    height: 28rpx;
  }

  .c-table-more {
    height: 64rpx;
    width: 100%;
    line-height: 64rpx;
    text-align: center;
    background: rgba(245, 248, 250, 1);
    color: rgba(97, 100, 102, 1);
    font-size: 28rpx;
  }
</style>
